Type Inference for Parameterized Race-Free Java

نویسندگان

  • Rahul Agarwal
  • Scott D. Stoller
چکیده

We study the type system introduced by Boyapati and Rinard in their paper “A Parameterized Type System for Race-Free Java Programs” and try to infer the type annotations (“lock types”) needed by their type checker to show that a program is free of race conditions. Boyapati and Rinard automatically generate some of these annotations using default types and static inference of lock types for local variables, but in practice, the programmer still needs to annotate on the order of 1 in every 25 lines of code. We use run-time techniques, based on the lockset algorithm, in conjunction with some static analysis to automatically infer most or all of the annotations.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Type Inference Against Races

The race condition checker rccjava uses a formal type system to statically identify potential race conditions in concurrent Java programs, but it requires programmer-supplied type annotations. This paper describes a type inference algorithm for rccjava. Due to the interaction of parameterized classes and dependent types, this type inference problem is NP-complete. This complexity result motivat...

متن کامل

Type Discovery for Parameterized Race-Free Java

Concurrent programs are notorious for containing data races that are difficult to reproduce and diagnose at run-time. This inspired the development of type systems that statically ensure the absence of data races. Boyapati and Rinard’s Parameterized Race Free Java (PRFJ) is an extension of Java with such a type system. We give the first complete formal presentation of PRFJ; Boyapati and Rinard’...

متن کامل

Dynamic inference of polymorphic lock types

We present an approach for automatically proving the absence of race conditions in multi-threaded Java programs, using a combination of dynamic and static analysis. The program in question is instrumented so that when executed it will gather information about locking relationships. This information is then fed to our tool, FindLocks, that generates annotations needed to type check the program u...

متن کامل

Polymorphic Type Inference for the JNI

We present a multi-lingual type inference system for checking type safety of programs that use theJava Native Interface (JNI). The JNI uses specially-formatted strings to represent class and field namesas well as method signatures, and so our type system tracks the flow of string constants through theprogram. Our system embeds string variables in types, and as those variables are re...

متن کامل

History Types and Verification

We develop a novel programming logic for verifying security properties, allowing histories of program execution to be taken into account: validity of access depends on the explicit sequence of past actions. The main result of the paper is a novel static analysis combining a type and effect inference system with a model-checking procedure, that guarantees validity of run-time history assertions....

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2004